<%@ page language="java" contentType="text/html; charset=utf-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>事件性质</title>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp" %>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/ajaxException.js"></script>
<script>
var keyword = null;
   function itemAdd(){
      var url = "${ctx}/system_systemCustEventNatureAction.do?method=addPage";
      top.windowOpen(url, "systemCustEventNature", "事件性质", 280, 500);
   }
   
   function itemEdit(tag){
	   if(keyword == null){
		   	Alert('请选择数据！');
	     return false;
	}
      var url = "${ctx}/system_systemCustEventNatureAction.do?method=editPage&keyword="+keyword;
      top.windowOpen(url, "systemCustEventNature", "事件性质", 280, 500);
   }
   function itemDelete(){
	   	  if(keyword == null){
	   	   	Alert('请选择数据！');
	        return false;
	   	  }
	   	  else{
	      	AskConfirm("${key.tipsByDeleteConfirm}","mainFrame","deleteItem");
	   	  }
	   }
		function deleteItem(){
			var url = '${ctx}/system_systemCustEventNatureAction.do?method=delete&keyword='+keyword;
			new Ajax.Request(url,{method: 'post' ,onSuccess : showResponse});
		}

		function showResponse(response){
			ajaxSubmitException(response.responseText);
			if(response.responseText == "true" ){
				refresh();
			}
			
		}
	   
		function onRowClick(tag){
			keyword = tag ;
		}

		function refresh(){
			//alert("调用了！");
			window.location.href="${ctx}/system_systemCustEventNatureAction.do?method=initMain";
		}
</script>
</head>
<body>
<div style="overflow: auto; height: 450px;" >
<table border="0" cellspacing="0" cellpadding="0"  width="100%" class="bg_search" id="search01" >
      <tr>
        <td>&nbsp;</td>
      </tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0">

    <tr>
      <td class="bg_toolBar"><table border="0" cellpadding="0" cellspacing="0">
        <tr>

<td class="toolbarico"><a href="#"  onclick="javascript:itemAdd();" onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="${key.addChargeItem}"/>&nbsp;</a></td>
<td class="toolbarico"><a href="#"  onclick="javascript:itemEdit();" onfocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" alt="${editChargeItem}" width="16" height="16" border="0" align="absbottom" /></a></td>
<td class="toolbarico"><a href="#"  onClick="javascript:itemDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="${key.delete}" width="16" height="16" border="0" align="absbottom"></a></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td valign="top">
	   <ec:ceTable
			    items="queryDataList"
				action="${ctx}/system_systemCustEventNatureAction.do?method=queryDataList"
				var="item"
				view="pmsview"
				styleClass="gridData2"
				rowsDisplayed="15">
				<ec:ceRow onclick="javascript:onRowClick(${item.keyword});" styleClass="grid" onContextMenu="return ShowContextMenu(event,'quick_rightmenu')">
					<ec:ceColumn headerCell="pmsHeadrCell" title="${key.eventNatureName}" property="name"   width="30%" />
					<ec:ceColumn headerCell="pmsHeadrCell" title="${key.eventNatureRemark}" property="remark"  width="50%"/>
					<ec:ceColumn headerCell="pmsHeadrCell" title="${key.eventNatureShowOrder}" property="sequence" width="20%"/>
				</ec:ceRow>
		</ec:ceTable>
       </td>
    </tr>
  </table>
  </div>
<!-- 右键菜单 -->
<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="javascript:itemAdd();" onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="${key.add}"/> ${key.add} </a></td>
          </tr>
        <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onClick="javascript:itemEdit();" onFocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" alt="${key.modify}" width="16" height="16" border="0" align="absbottom" /> ${key.modify}</a></td>
          </tr>
        <tr>
          <td class="quickMenu_toolbarico"><a href="#" onClick="javascript:itemDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="${key.delete}" width="16" height="16" border="0" align="absbottom"> ${key.delete}</a></td>
          </tr>

      </table></td>
    </tr>
  </table>
</div>
</body>
</html>
